import React, { PureComponent } from "react";

export default class extends PureComponent {
  render() {
    const { children, onClick } = this.props;

    return <button onClick={() => onClick && onClick()}>{children}</button>;
  }
}
